package com.fourth.exception;

import com.ljx.vo.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Mr.ma
 * @since 2023/3/4 14:50
 **/
@ControllerAdvice
public class AliPayException {
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public Result exception(Exception e){
        return new Result(5000,"服务器异常，请稍后重试",e.getMessage());
    }
}
